<?php

use yii\db\Migration;

/**
 * Handles the creation of table `project_evaluation`.
 */
class m171027_060753_create_project_evaluation_table extends Migration
{
    /**
     * @inheritdoc
     * （保证、混合类项目预评估）价值评估
     */
    public function up()
    {
        //
        $this->createTable('project_pre_evaluation_value_evaluation', [
            'id' => $this->bigPrimaryKey(),
            'project_id' => $this->bigInteger()->notNull(),
            'reference' => $this->string()->notNull()->comment('参考资产市场价值'),
            'conservation' => $this->string()->notNull()->comment('保守回收预估值'),
            'radical' => $this->string()->notNull()->comment('激进回收预估值	'),
            'recall' => $this->text()->notNull()->comment('回收预评估价值说明'),
            'created_at' => $this->timestamp(),
            'lock_user' => $this->integer()->comment('上锁用户'),
            'lock_timestamp' => $this->string()->comment('上锁时间'),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('project_evaluation');
    }
}
